package com.xhwl.data.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xhwl.common.pojo.cent.sdata.ThemeConfig;
import com.xhwl.data.dao.IThemeConfigDao;
import com.xhwl.data.service.IThemeConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: lrp
 * @Description: 业态主题配置
 * @Date: Create in 10:53 2021-10-30
 */
@RestController
public class ThemeConfigServiceImpl extends ServiceImpl<IThemeConfigDao, ThemeConfig> implements IThemeConfigService {
    @Autowired
    private IThemeConfigDao themeConfigDao;

    public Boolean themeConfCheck(ThemeConfig themeConfig) {
        QueryWrapper<ThemeConfig> themeConfQueryWrapper = new QueryWrapper<>();
        themeConfQueryWrapper.eq("industry_id", themeConfig.getIndustryId());
        ThemeConfig themeConf = themeConfigDao.selectOne(themeConfQueryWrapper);
        return themeConf == null;
    }
}
